package org.xfy.ymcc.feign.fallback;

import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;
import org.xfy.common.result.JsonResult;
import org.xfy.ymcc.domain.Login;
import org.xfy.ymcc.feign.LoginFeignClient;
@Component
public class LoginFeignclientFallbackFactory implements FallbackFactory<LoginFeignClient> {
    @Override
    public LoginFeignClient create(Throwable throwable) {
        return new LoginFeignClient() {
            @Override
            public JsonResult saveOrUpdate(Login login) {
                return JsonResult.error("saveOrUpdate调用失败");
            }
        };
    }
}
